package com.kk.netty.nio.network.selector;

import java.io.IOException;
import java.nio.channels.SelectionKey;
import java.nio.channels.Selector;
import java.nio.channels.ServerSocketChannel;

public class TestSelector {
    public static void main(String[] args) throws IOException {
        Selector selector = Selector.open ( );

        ServerSocketChannel channel = ServerSocketChannel.open ( );
        channel.configureBlocking (false);
        // 根据常量值来选择绑定类型 SelectionKey.OP_ACCEPT
        SelectionKey key = channel.register (selector, SelectionKey.OP_ACCEPT);

    }
}
